Login and error fix