Finally I solved all important bugs, that was in the registration, login and logout.