implemented login(), tested working!