started work on login system, fixed a bug with flash message