fixed login thing to use new DB return and fixed login ifelse