add client side validation
redirect to homepage after login