Moved LoginModule and fixed nullpointer