fix but of redirecting to blank page after rigstration/login from the 'store' route function by moving the extracted functionality of registration/login from the register and login functions both to the 'store' route function