Login and registration now working properly