Bug fixing in course functions and login