added login in functionality