working login and register and nav