pass a concrete message class instead of object to message handlers

fixed some login stability issues