refactored authentication

added awesomeness