Trying to come up with your own solution to this is a very "roll your own auth" approach to such an important thing.