added login functionality (hopefully)