Fix login statement order