Login working with ajax and navigation bar updating on login