added login module. instead of usersession request.getprincipal is used.