added login functions