add flashmessage function for login page