fixed menu bugs and message sorting bug

login still has issues