Added functionality to check for username and password.