fixing user, profile, local storage and redirect bugs