edited railtie to check and update user roles on every login
add js to login