Fix some logic issues
Fix some logic issues
Add form validation for the login form