add test for tr
add new alogoritm for login: save ip and user_agent