added array helper, fixed auth (login, register)