finished basic login functionality