Fix bug in custom login initialization