Added guards to state change start to prevent access if user not logged in