protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException 
	{
		user = (User) request.getSession().getAttribute("user");
		System.out.println("User: " + user);
		//Check is user is logged in for session
		if (checkLoggedIn(request))
		{
			//Logged-in...
			
			if (request.getRequestURI().equals(request.getContextPath() + "/messages"))
			{
				//Simply ask for all user's and people their following's messages:
				userMessages = (List<Message>) messageService.fetchUserFriendMessages(user);
				request.setAttribute("userMessages", userMessages);	
				request.getRequestDispatcher("/messages.jsp").forward(request, response);	//TODO: Correct forward jsp page?
				return;
			}
			else
			{
				
				//TODO: Check for 404 x2
				
				//Check uri for "/messages/<id>"  - Get single Message:
				int lastSeparator = request.getRequestURI().lastIndexOf('/');
				String uriString = request.getRequestURI().substring(lastSeparator + 1);
				
				
				try
				{
					//Check uri for "/messages/<id>"  - Get single Message
					int messageId = Integer.valueOf(uriString);
					Message message = messageService.fetchMessage(messageId);
					if (message == null)
					{
						request.getRequestDispatcher("404.jsp").forward(request, response);
						return;
					}
					request.setAttribute("message", message);	
					request.getRequestDispatcher("/message.jsp").forward(request, response);	//TODO: Correct forward jsp page?
					
				}
				catch (NumberFormatException nfe)
				{
					//Not an id, must be a user
					// check for "/messages/<userEmail>" - Get all a user's messages:
					userMessages = messageService.getUserMessages(uriString);
					request.setAttribute("userMessages", userMessages);	
					request.getRequestDispatcher("profile.jsp").forward(request, response);	//TODO: Correct forward jsp page?
				}

				return;
			}
			

		}
		else
		{	//Not logged in - Redirect to login page
			response.sendRedirect(request.getContextPath() + "/login");	
			return;

		}
		
			
	}