Fix error where inactive users can log in