added login and register actions