changed the code in User to what works properly