working on authentication functionality