Adding more logic to parse login