added login functions

added login functions