added login, and register validation