added login function is working now