added local login functionality