1) added login functionality