Added flash middleware
Added result messages at login/register