added login mechanism